import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import ShipmentPercentItem from "./index";

const meta = {
  title: "样式原子组件/销售进度分析-ShipmentPercentItem",
  component: ShipmentPercentItem,
  tags: ["autodocs"],
  argTypes: {
    primaryColor: {
      control: "color",
    },
  },
  decorators: [
    (Story) => (
      <div style={{ backgroundColor: "#06112B" }}>
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof ShipmentPercentItem>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    typeTitle: "发货执行",

    percent: 80,
    amount: 9998,
    unitName: "万元",
    primaryColor: "#68A8FF",
    imgProps: {
      src: "https://test-ymsl.kxgcc.com:30195/public/website/cockpit/p1.png",
    },
  },
};

export const noUnitName: Story = {
  args: {
    typeTitle: "发货执行",

    percent: 80,
    amount: 9998,
    unitName: "",
    primaryColor: "#68A8FF",
    imgProps: {
      src: "https://test-ymsl.kxgcc.com:30195/public/website/cockpit/p1.png",
    },
  },
};
